<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>溢出设置</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            border:  3px solid red;
            /*超出部分隐藏*/
            overflow: hidden;
            /*超出部分显示(默认)*/
            overflow: visible;
            /*超出滚动显示*/
            overflow: scroll;
        }
        #i1{
            width: 100px;
            height: 100px;
            /*设置行内元素的垂直对齐方式：基线（默认），上/中/下*/
            vertical-align: baseline;/*基线对齐*/
            vertical-align: top;
            vertical-align: middle;
            vertical-align: bottom;
        }
    </style>
</head>
<body>
<input id="i1" type="text"><img src="../2.jpg">
<div>
    <img src="../2.jpg">
</div>
</body>
</html>